<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sysCustBlacklistTypeBean.id}"/>
		<f:event type="preRenderView" listener="#{sysCustBlacklistTypeBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sys Cust Blacklist Type"/>

	<ui:define name="header">
		Sys Cust Blacklist Type
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sysCustBlacklistTypeBean.id}">
				Edit existing Sys Cust Blacklist Type
			</c:when>
			<c:otherwise>
				Create a new Sys Cust Blacklist Type
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sysCustBlacklistTypeBeanSysCustBlacklistTypeBlTypeNo" value="Bl Type No:"/>
				<h:panelGroup>
					<h:inputText id="sysCustBlacklistTypeBeanSysCustBlacklistTypeBlTypeNo" required="true" value="#{sysCustBlacklistTypeBean.sysCustBlacklistType.blTypeNo}"/>
					<h:message for="sysCustBlacklistTypeBeanSysCustBlacklistTypeBlTypeNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="sysCustBlacklistTypeBeanSysCustBlacklistTypeBlTypeDescr" value="Bl Type Descr:"/>
				<h:panelGroup>
					<h:inputText id="sysCustBlacklistTypeBeanSysCustBlacklistTypeBlTypeDescr" maxLength="100" value="#{sysCustBlacklistTypeBean.sysCustBlacklistType.blTypeDescr}"/>
					<h:message for="sysCustBlacklistTypeBeanSysCustBlacklistTypeBlTypeDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysCustBlacklistTypeBeanSysCustBlacklistTypeSysCustBlacklists" value="Sys Cust Blacklists:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysCustBlacklistTypeBean.sysCustBlacklistType.sysCustBlacklists}"/>
					<h:dataTable id="sysCustBlacklistTypeBeanSysCustBlacklistTypeSysCustBlacklists" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Cust"/>
							</f:facet>
							<h:link outcome="/form/sysCustBlacklist/view">
								<f:param name="id" value="#{_item.blNo}"/>
								<h:outputText id="forgeviewdisplayitemSysCust" value="#{forgeview:display(_item.sysCust)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysCustBean.converter}" id="sysCustBlacklistBeanAddSysCust" value="#{sysCustBlacklistBean.add.sysCust}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysCustBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysCustBlacklistBeanAddSysCust" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Bl Org No"/>
							</f:facet>
							<h:link outcome="/form/sysCustBlacklist/view">
								<f:param name="id" value="#{_item.blNo}"/>
								<h:outputText id="itemBlOrgNo" value="#{_item.blOrgNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCustBlacklistBeanAddBlOrgNo" value="#{sysCustBlacklistBean.add.blOrgNo}"/>
								<h:message for="sysCustBlacklistBeanAddBlOrgNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Bl Date"/>
							</f:facet>
							<h:link outcome="/form/sysCustBlacklist/view">
								<f:param name="id" value="#{_item.blNo}"/>
								<h:outputText id="itemBlDate" value="#{_item.blDate}">
									<f:convertDateTime type="date"/>
								</h:outputText>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCustBlacklistBeanAddBlDate" maxLength="10" value="#{sysCustBlacklistBean.add.blDate}">
									<f:convertDateTime type="date"/>
								</h:inputText>
								<h:message for="sysCustBlacklistBeanAddBlDate" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Bl Comment"/>
							</f:facet>
							<h:link outcome="/form/sysCustBlacklist/view">
								<f:param name="id" value="#{_item.blNo}"/>
								<h:outputText id="itemBlComment" value="#{_item.blComment}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCustBlacklistBeanAddBlComment" maxLength="500" value="#{sysCustBlacklistBean.add.blComment}"/>
								<h:message for="sysCustBlacklistBeanAddBlComment" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Bl Is Cancel Status"/>
							</f:facet>
							<h:link outcome="/form/sysCustBlacklist/view">
								<f:param name="id" value="#{_item.blNo}"/>
								<h:outputText id="itemBlIsCancelStatus" value="#{_item.blIsCancelStatus}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysCustBlacklistBeanAddBlIsCancelStatus" value="#{sysCustBlacklistBean.add.blIsCancelStatus}"/>
								<h:message for="sysCustBlacklistBeanAddBlIsCancelStatus" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysCustBlacklistBean.added)}" id="sysCustBlacklistTypeBeanSysCustBlacklistTypeSysCustBlacklistsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysCustBlacklistBean.add.sysCustBlacklistType}" value="#{sysCustBlacklistTypeBean.sysCustBlacklistType}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sysCustBlacklistTypeBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sysCustBlacklistTypeBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sysCustBlacklistTypeBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sysCustBlacklistTypeBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>